package com.study.jvm._1;

public class Jvm1 {
    static {
        System.out.println("JVM");
    }

    {
        System.out.println("code ");
    }

    public static void function(A a) {
        System.out.println("fun A");
    }

    public static void function(B b) {
        System.out.println("fun B");
    }

    public static void main(String[] args) {
        // main函数所在的class先初始化
        // 父类先初始化, 子类在初始化
        A a = new B();
        function(a);
    }
}
